package com.yycx.module.user.provider.service.impl;

import com.yycx.module.user.client.entity.AppModule;
import com.yycx.module.user.provider.mapper.AppModuleMapper;
import com.yycx.module.user.provider.service.AppModuleService;
import com.yycx.common.mybatis.base.service.impl.BaseServiceImpl;
import com.yycx.common.mybatis.model.ResultBody;
import org.springframework.stereotype.Service;
import com.yycx.common.base.entity.EntityMap;
import com.yycx.common.mybatis.query.CriteriaQuery;
import org.springframework.transaction.annotation.Propagation;
import com.yycx.common.mybatis.query.CriteriaSave;
import org.springframework.transaction.annotation.Transactional;

/**
 * APP模块定义接口实现类
 *
 * @author flyme
 * @date 2024-07-08
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class AppModuleServiceImpl extends BaseServiceImpl<AppModuleMapper, AppModule> implements AppModuleService {

    @Override
    public ResultBody beforeAdd(CriteriaSave cs, AppModule module, EntityMap extra) {
        return ResultBody.ok();
    }



    @Override
    @Transactional(propagation = Propagation.NOT_SUPPORTED, readOnly = true)
    public ResultBody beforePageList(CriteriaQuery<AppModule> cq, AppModule module, EntityMap requestMap) {
      cq.orderByDesc("module.createTime");
      return ResultBody.ok();
    }
}
